package com.cxx.mapper;

import com.cxx.pojo.Admin;
import com.cxx.pojo.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
    //注册功能
    void regist(User user);
    //查询账号是否重复
    boolean select(String userName);
    boolean selectAdmin(String userName);
    //登录模块
    User exist(String userName, String userPassword);
    Admin adminExist(String userName, String userPassword);
    //修改信息模块
    void updateUser(User user);
    void updateAdmin(Admin admin);
    //信息显示
    User selectByUserAccount(String userAccount);
    Admin selectByAdminAccount(String adminAccount);

    List<User> selectAllUsers();

    boolean forbiddenUser(String account);

    boolean allowUser(String account);
}
